import request from '@/utils/request'

/**
 * 查询字典项
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'get',
    params: { dictCode }
  })
}

export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/servicePositional/queryPage',
    method: 'post',
    data
  })
}

/**
 * 批量删除
 * @param {*} id
 */
export function dels(ids) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/servicePositional/deleteByIds',
    method: 'get',
    params: { ids }
  })
}

/**
 * 删除
 * @param {*} id
 */
export function del(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/servicePositional/deleteById',
    method: 'get',
    params: { id }
  })
}

/**
 * 发布
 * @param {*} data
 */
export function send(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/servicePositional/send',
    method: 'get',
    params: { id }
  })
}

/**
 * 取消发布
 * @param {*} data
 */
export function cancle(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/servicePositional/cancle',
    method: 'get',
    params: { id }
  })
}

